<%@ page language="java" import="java.util.*,com.entity.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=" http://www.w3.org/1999/xhtml">
  <head>
    <title>在线人员</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <script src="js/jquery.js" type="text/javascript"></script>
    <script src="js/jquery.cookie.js" type="text/javascript"></script>
    <script src="js/jquery.treeview.js" type="text/javascript"></script>
    <script src="js/permtree.js" type="text/javascript"></script>
    <link rel="stylesheet" href="css/jquery.treeview.css" />
    <link rel="stylesheet" type="text/css" href="css/style.css" />
    <style type="text/css">
     li a {
            font-size:12px;
   			outline:none;
		}
	 li a:hover
	  {
	     font-size:16px;
	     background-color:#CCCCCC;
	  }
    </style>
    <script>
	$(document).ready(function(){
	$("#browser").treeview();
	$("#browser").permtree(); 
});

  function tb_remove()
  {
      window.top.close();
  }
    </script>
  </head>
  
  <body>
 <table class="TableTop" width="100%">
   <tbody><tr>
      <td class="left"></td>
      <td class="center subject">
        <span style="text-align: left">在线人员</span> 
      </td>
      <td class="right"></td>
   </tr>
     </tbody></table>
  <table width="100%" border="1" cellspacing="0" cellpadding="5">
  
    <tr>
    <%
    List onlineUserList = (List)application.getAttribute("onlineUserList");
    List dwlist =(List)request.getSession().getServletContext().getAttribute("newList");
    System.out.println("++++++"+onlineUserList.size()+"*****");
    %>
      <td>
      <ul id="browser">
        <li>
            市级用户
             <%for(int i=0;i<onlineUserList.size();i++)
             {
                 if(((Dlyh)onlineUserList.get(i)).getZd().getTypename().endsWith("市")&&((Dlyh)onlineUserList.get(i)).getZd().getParentid().equals(745)){%>
                  <ul>
		              <li><img src="/images/group.png" /> <%=((Dlyh)onlineUserList.get(i)).getZsxm() %></li>
		           </ul>
                 <%}
             }
             %>
		         </li>
		         <li>
                    县级用户
		       <%
                Iterator it2 = onlineUserList.iterator();
                while(it2.hasNext())
		        {
		        //System.out.println("用户部门2："+((Zd)dwlist.get(j)).getTypename());
		        Dlyh dlyh2 = (Dlyh)it2.next();
		         if((dlyh2.getZd().getTypename().endsWith("县")||dlyh2.getZd().getTypename().equals("武安市"))&&!dlyh2.getZd().getTypename().equals("工业园区")){
		         %> <ul>
		              <li><img src="/images/group.png" /> <%=dlyh2.getZsxm() %></li>
		              </ul>
		          <%}}%>
		          </li>
		          <li>
                     乡级用户
		          <%
		          Iterator it3 = onlineUserList.iterator();
		          while(it3.hasNext())
				  {
			      Dlyh dlyh3 = (Dlyh)it3.next();
			      //System.out.println("用户部门3："+dlyh3.getZd().getTypename());
		           if(dlyh3.getZd().getTypename().endsWith("乡")||dlyh3.getZd().getTypename().equals("工业园区")||dlyh3.getZd().getTypename().endsWith("镇")||dlyh3.getZd().getTypename().endsWith("专职书记")||dlyh3.getZd().getTypename().endsWith("办")||dlyh3.getZd().getTypename().endsWith("办事处")||dlyh3.getZd().getTypename().endsWith("局")||dlyh3.getZd().getTypename().endsWith("社")||dlyh3.getZd().getTypename().endsWith("集团")||dlyh3.getZd().getTypename().endsWith("院")||dlyh3.getZd().getTypename().equals("民航")){
		            System.out.println("用户部门33："+dlyh3.getDlyhmm());
		           %> 
		              <ul>
		              <li><img src="/images/group.png" /> <%=dlyh3.getZsxm() %></li>
		              </ul>
		          <%}} 
		          //}}%>
		          </li>
       </ul>
      </td>
    </tr>
     <tr>
     <td align="center"><input type="button" value="刷新" onclick="reloadPage()" />&nbsp;&nbsp;&nbsp;
        <input type="button" value="关闭" onclick="closethis()" />
     </td>
   </tr>
  </table>
<script type="text/javascript">
 function reloadPage() {
         window.location.reload(true);
         history.go();
         document.execCommand("refresh")
         document.location = document.location;
         document.location.reload();
     }
 function closethis()
 {
     window.top.close();
 }
</script>
</body>
</html>
